#!/usr/bin/env ruby

require 'fileutils'
include FileUtils

system "container/site_controller.rb stop localhost"
system "rake clear"

system "container/create_app_container.rb container/create_app_container.config.sample.local"
cd "config/sites/localhost/web" do
  system "rails rails"
end
cd "config/sites/localhost/config" do 
  (2..4).each do |i|
  	cp "monit.127.0.0.1.1400#{i}.config.reserve", "monit.127.0.0.1.1400#{i}.config"
  end
end
system "container/site_controller.rb start localhost"
